<%@page import="interview1.InterViewVo"%>
<%@page import="interview1.InterView"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
#upload_main{
	width: 700px;
	border: 2px solid black;
	border-radius: 5px;
	margin:0 auto;
	margin-top:20px;
	margin-bottom: 50px;
	padding-bottom:20px;
}
#upload_title{
	width: 100%;
	text-align: center;
	margin-top:10px;
	margin-bottom:10px;
	font-size: 30px;
}
#um_mid, #um_title, #um_content{
	width: 90%;
	border: 2px solid #BDBDBD;
	border-radius: 3px;
	margin-left: 20px;
	margin-bottom: 3px;
	padding-left: 5px;
	padding-top:5px;
	padding-bottom: 5px;
}
#um_title{
	
}
#um_content{
	
}
.btngo{
	width: 70px;
	height: 30px;
	border-radius: 5px;
}
</style>
<script>
function btn_list1(){
	location.href="index.jsp?inc_contents=./interview_list.jsp";
}

function btresult(){
	
	var subject2 = document.getElementById('subject').value;
	var content2 = document.getElementById('content').value;
	
	if(subject2 == null || subject2.trim() == "" || content2 == null || content2.trim() == "") {

		alert("모든 공간을 입력해주세요");
	} else {
			
		var f = confirm("저장 하시겠습니까?");
		if(f){
			up_frm.action="index.jsp?inc_contents=./interview/interview_upload_result.jsp";
			up_frm.submit();
		}else{
			alert("취소되었습니다.");
		}
	}
	
}
</script>
</head>
<body>
<jsp:useBean id="interVo" class="interview1.InterViewVo"/>
<jsp:setProperty property="*" name="interVo"/>
<% 
//아이디 정보 가져오는 것(로그인 확인하는 것)
String sessionID=(String)session.getAttribute("mid");
%>
<%
InterView iv = new InterView();
iv.setVo(interVo);
InterViewVo vo = iv.view();
%>
	
	<div id="upload_main">
		<div id="upload_title">게시물 업로드</div>
		
		<form name="up_frm" action="" method="post">
			<div id="um_mid">
				작&ensp;성&ensp;자 : <input type="text" name="mid" style="width: 500px" value="">
			</div>
			
			<div id="um_title">
				제&emsp;&emsp;목 : <input type="text" id="subject" name="subject" style="width: 500px" value="">
			</div>
			
			<div id="um_content">
				내&emsp;&emsp;용 <br/><br/>
			<textarea id="content" name="content" rows="20" cols="80"></textarea>
			</div>
			
			<br/><br/>
			<center>

			<input type="button" value="전송" class="btngo" onclick="btresult()">&nbsp;

			<input type="button" value="목록" class="btngo" onclick="btn_list1()">
			
			</center>
			
		</form>
	</div>

</body>
</html>